package com.lfs.notify.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.*;

import java.util.Random;

@RestController
@RequestMapping(value = "/virtual")
public class VirtualController {

    private static final Logger logger = LoggerFactory.getLogger(VirtualController.class);

    /**
     * @param
     * @return
     */
    @GetMapping("/virtualNotify")
    @ResponseBody
    public String virtualNotify(@RequestParam("orderNo") String orderNo,@RequestParam("reqStreamId") String reqStreamId,
                                @RequestParam("price") String price,@RequestParam("agtPhone") String agtPhone,
                                @RequestParam("state") String state,@RequestParam("sign") String sign) {
        Random random = new Random();
        int a  = random.nextInt(2);
        if(a == 1){
            return "success";
        }else{
            return "fail";
        }
    }
}
